package com.wx.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wx.common.BaseEntity;
import com.wx.common.CreateValidate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>Title:      SysPatientFollow. </p>
 * <p>Description AE上报记录 </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    医百科技有限公司 </p>
 *
 * @author         yangwensheng@100doc.com.cn
 * @since      2021-03-22 10:51:46
 */
@Table(name = "sys_patient_follow")
@Data
@ApiModel(value = "SysPatientFollow")
public class SysPatientFollow extends BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 患者id
	 */
	@Column(name = "patient_id")
	@ApiModelProperty(value = "患者id")
	@NotEmpty(message = "患者id不能为空" , groups = CreateValidate.class)
	private String patientId;

	/**
	 * 患者名称
	 */
	@Column(name = "patient_name")
	@ApiModelProperty(value = "患者名称")
	private String patientName;

	/**
	 * 入组时间
	 */
	@Column(name = "join_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@ApiModelProperty(value = "入组时间")
	private Date joinTime;

	/**
	 * 入组省份
	 */
	@Column(name = "join_province_id")
	private String joinProvinceId;

	/**
	 * 入组城市
	 */
	@Column(name = "join_city_id")
	private String joinCityId;

	/**
	 * 是否处方
	 */
	@Column(name = "prescription")
	private Integer prescription;

	/**
	 * 转化原因
	 */
	@Column(name = "change_reason")
	private String changeReason;

	/**
	 * 随访手册编号
	 */
	@Column(name = "follow_code")
	@ApiModelProperty(value = "随访手册编号")
	private String followCode;

	/**
	 * 随访内容
	 */
	@Column(name = "content")
	@ApiModelProperty(value = "随访内容（JSON字符传）")
	private String content;

	/**
	 * 随访时间
	 */
	@Column(name = "follow_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@ApiModelProperty(value = "随访时间")
	private Date followTime;

	/**
	 * 状态： 0：未随访 1：已随访
	 */
	@Column(name = "status")
	@ApiModelProperty(value = "状态： 0：未随访 1：已随访")
	private Integer status;

	/**
	 * 短信提醒的次数
	 */
	@Column(name = "remind_number")
	@ApiModelProperty(value = "短信提醒的次数")
	private Integer remindNumber;


	/**
	 * 类型 0：随访  1：问询
	 */
	@Column(name = "type")
	@ApiModelProperty(value = "类型 0：随访  1：问询")
	private Integer type;

	/**
	 * 护士id
	 */
	@Column(name = "nurse_id")
	@ApiModelProperty(value = "护士id")
	private String nurseId;

	/**
	 * 医院id
	 */
	@Column(name = "hospital_id")
	@ApiModelProperty(value = "医院id")
	private String hospitalId;

	/**
	 * 医院类型
	 */
	@Column(name = "hospital_type")
	@ApiModelProperty(value = "医院类型")
	private String hospitalType;

	/**
	 * 大区"
	 */
	@Column(name = "region")
	@ApiModelProperty(value = "大区")
	private String region;

	/**
	 * 大区"
	 */
	@Column(name = "big_region")
	@ApiModelProperty(value = "大区")
	private String bigRegion;

	/**
	 * 区域id
	 */
	@Column(name = "range_id")
	@ApiModelProperty(value = "区域id")
	private String rangeId;

	@ApiModelProperty(value = "护士手机号")
	@Transient
	private String nursePhone;


	@ApiModelProperty(value = "患者手机号")
	@Transient
	private String patientPhone;

	/**
	 * 是否是第一条随访记录
	 */
	@Column(name = "serial_number")
	@ApiModelProperty(value = "是否是第一条随访记录")
	private Integer serialNumber;


}
